//
//  main.cpp
//  array_nested
//
//  Created by 李燚 on 2022/10/22.
//

#include <iostream>

const int Cities = 5;
const int Years = 4;
int main(int argc, const char * argv[]) {
    const char * cities[Cities] = {
        "Cribble City",
        "Gribbletown",
        "New Cribble",
        "San Gribble",
        "Gribble Vista",
    };
    int maxtemps[Years][Cities] = {
        {96, 100, 87, 101, 105},
        {96, 98, 91, 107, 104},
        {97, 101, 93, 108, 107},
        {98, 103, 95, 109, 108},
    };
    std::cout << "Maxinum temperatures for 2008 - 2011\n\n";
    for(int city = 0; city < Cities; ++city) {
        std::cout << cities[city] << ":\t";
        for (int year = 0; year < Years; ++year) {
            std::cout << maxtemps[year][city] << "\t";
        }
        std::cout << std::endl;
    }
    
    std::cout << "\n\n\n\n\n";
    std::cout << "Enter number of rows: ";
    int num;
    std::cin >> num;
    std::cout.put(num);
    std::cout << "\n";
    num += 1;
    for (int i = num - 1; i > 0; i--) {
        for (int j = 1; j < num; j++) {
            if (i > j) {
                std::cout << "a";
            } else {
                std::cout << "b";
            }
        }
        std::cout << "\n";
    }
    return 0;
}
